import type { R } from '@/api/model/resultModel';
import { request } from '@/utils/request';
export function getRankListLeft() {
  return request.get<R<void>>({
    url: 'index/rankList/left',
  });
}
export function getRankListRight() {
  return request.get<R<void>>({
    url: 'index/rankList/right',
  });
}

export function getCard1() {
  return request.get<R<void>>({
    url: 'index/card/card1',
  });
}

export function getCard2() {
  return request.get<R<void>>({
    url: 'index/card/card2',
  });
}

export function getCard3() {
  return request.get<R<void>>({
    url: 'index/card/card3',
  });
}
export function getCard4() {
  return request.get<R<void>>({
    url: 'index/card/card4',
  });
}

export function getBarChart(timeArray: any[]) {
  return request.get<R<void>>({
    url: `/index/output/barData/${timeArray}`,
  });
}

export function getBarCard1() {
  return request.get<R<void>>({
    url: '/index/output/barCard1',
  });
}

export function getBarCard2() {
  return request.get<R<void>>({
    url: '/index/output/barCard2',
  });
}

export function getLineChart(timeArray: any[]) {
  return request.get<R<void>>({
    url: `/index/middle/lineChartData/${timeArray}`,
  });
}

export function getPieChart() {
  return request.get<R<void>>({
    url: '/index/middle/pie',
  });
}
